using System.Xml.Serialization;
namespace Opo.Perspective.Core
{
    /// <summary>
    /// Represents a flag for marking <see cref="IPerspectiveEntity">IPerspectiveEntities</see>.
    /// </summary>
    [XmlRoot("flag")]
    public class Flag : IFlag
    {
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        [XmlText]
        public string Name { get; set; }
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        /// <value>The type.</value>
        [XmlAttribute("type")]
        public string Type { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="Flag"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        public Flag(string name)
        {
            Name = name;
        }
    }
}